package com.hm.oltu.model;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import lombok.Data;

@Data
@Document(collection="oltu_user")
public class User implements Serializable{
	private static final long serialVersionUID = 1L;
	@Id
	private String id;
	private String username;
	private String password;
	private String salt;
	private Long createTime;
	private Map<String,Object> extension = new HashMap<String,Object>();

	public String getCredentialsSalt() {
		return username + salt;
	}
}
